using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class tbs_DupBatchesMap : EntityTypeConfiguration<tbs_DupBatches>
    {
        public tbs_DupBatchesMap()
        {
            // Primary Key
            this.HasKey(t => t.Type);

            // Properties
            this.Property(t => t.Type)
                .IsRequired()
                .HasMaxLength(15);

            this.Property(t => t.batch)
                .IsFixedLength()
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("tbs_DupBatches");
            this.Property(t => t.Type).HasColumnName("Type");
            this.Property(t => t.C_).HasColumnName("#");
            this.Property(t => t.Date).HasColumnName("Date");
            this.Property(t => t.batch).HasColumnName("batch");
            this.Property(t => t.amount).HasColumnName("amount");
        }
    }
}
